function HandleContainerCustomer(gui, item, options) {
  this._gui = gui;
  this._item = item;
  this._options = options;
  
  this._createElements();
}

HandleContainerCustomer.prototype._createElements = function() {
  var _self = this;
  DOMUtils.removeChildElements(this._gui.customerNo);
  DOMUtils.removeChildElements(this._gui.brideName);
  DOMUtils.removeChildElements(this._gui.groomName);
  DOMUtils.removeChildElements(this._gui.bridePhone);
  DOMUtils.removeChildElements(this._gui.groomPhone);
  DOMUtils.removeChildElements(this._gui.brideMobile);
  DOMUtils.removeChildElements(this._gui.groomMobile);
  DOMUtils.removeChildElements(this._gui.date);
  DOMUtils.removeChildElements(this._gui.operator);
  
  this._gui.customerNo.appendChild(document.createTextNode(this._item.id));
  this._gui.brideName.appendChild(document.createTextNode(this._item.bridename));
  this._gui.groomName.appendChild(document.createTextNode(this._item.groomname));
  this._gui.bridePhone.appendChild(document.createTextNode(this._item.bridephone));
  this._gui.groomPhone.appendChild(document.createTextNode(this._item.groomphone));
  this._gui.brideMobile.appendChild(document.createTextNode(this._item.bridemobile));
  this._gui.groomMobile.appendChild(document.createTextNode(this._item.groommobile));
  this._gui.date.appendChild(document.createTextNode(' ' + SimpleDate.format(this._item.createdDate)));
  this._gui.operator.appendChild(document.createTextNode(' ' + ((this._item.userAccount) ? this._item.userAccount : 'None')));
  
  for (var i = 0, il = this._item.orders.length; i < il; i++) {
    var order = this._item.orders[i];
    DOMUtils.removeChildElements(this._gui.orderType[i].type);
    this._gui.orderType[i].type.appendChild(document.createTextNode(order.flag + ' ( ' + ((order.disposalstatus == 1) ? 'cancelled' : SimpleDate.format(order.date)) + ' )'));
  }
  if (this._options.operator.type == '{{$smarty.const.USER_TYPE_MANAGER_ASSISTANT|escape:javascript}}') {
    this._gui.view.onclick =  function() { location.href = '?p=pageasst&t=pagecustomerold&m=' + JSON.stringify({a:2, b:1}) + '&opts=' + JSON.stringify({ id: _self._item.id }); };
  } else if (this._options.operator.type == '{{$smarty.const.USER_TYPE_CUSTOMER_SERVICE|escape:javascript}}') {
    this._gui.view.onclick =  function() { location.href = '?p=pageserv&t=pagecustomerold&m=' + JSON.stringify({a:2, b:1}) + '&opts=' + JSON.stringify({ id: _self._item.id }); };
  } else if (this._options.operator.type == '{{$smarty.const.USER_TYPE_ADMIN|escape:javascript}}') {
    this._gui.view.onclick =  function() { location.href = '?p=pageadmin&t=pagecustomerold&m=' + JSON.stringify({a:2, b:1}) + '&opts=' + JSON.stringify({ id: _self._item.id }); };
  } else {
    this._gui.view.onclick =  function() { location.href = '?p=pagemanager&t=pagecustomerold&m=' + JSON.stringify({a:2, b:1}) + '&opts=' + JSON.stringify({ id: _self._item.id }); };
  }
};